import http from "@/api";

import { PORT1 } from "@/api/config/servicePort";


/**
 * 列表页表单数据
*/
export const getApplicationFormDetailList = (params: FormData) => {
  return http.post(PORT1+`/km/ismp-orders/list`, params, { cancel: false,loading: false  });
};

/**
 * 列表页表头
*/
export const getApplicationFormDetailHead = (params?: FormData) => {
  return http.post(PORT1+`/km/ismp-orders/field`, params, { cancel: false,loading: false  });
};


/**
 * 标签详情-detail
 * */ 
export const getDetailList = (params: FormData) => {
  return http.post(PORT1 + `/km/ismp-orders/detail`, params, { cancel: false,loading: false  })
}


/**
 * 重新生成EAC 或 简版
 * */ 
export const regenerateEADAPI =  (params: FormData) => {
  return http.get(PORT1 + `/km/ismp-orders/apply`, params, { cancel: false,loading: false  })
}


/**
 * 重置标签订单
 * */ 
export const orderResetAPI = (params: FormData) => {
  return http.get(PORT1 + `/km/ismp-orders/order-reset`, params, { cancel: false,loading: false  })
}

/**
 * 标签详情-批量编辑
 * */ 
export const updateFactoryAPI = (params?: FormData) => {
  const import_company_id = params.import_company_id
  delete params.import_company_id
  return http.post(PORT1 + `/km/ismp-orders/update-factory?import_company_id=${import_company_id}`, params, { cancel: false,loading: false  })
}

/**
 * 标签详情-搜索下拉
 * */ 
export const getFactoryNameCertifyAPI = (params?: FormData) => {
  return http.get(PORT1 + `/km/ismp-orders/search-options`, params, { cancel: false,loading: false  })
}


/**
 * PDF下载
 * */ 
export const downloadPdfApi = (params: FormData) => {
  return http.get(PORT1+`/km/pdf/download`, params, { cancel: false,loading: false  });
};

